package com.wl4837.demo1;

public class App
{
    public static void main( String[] args )
    {
        Creator creatorA = new ConcreteCreatorA();
        Product productA = creatorA.factoryMethod();
        productA.use(); // 输出：Using Product A

        Creator creatorB = new ConcreteCreatorB();
        Product productB = creatorB.factoryMethod();
        productB.use(); // 输出：Using Product B
    }
}
